case inside laravel query

27

case inside laravel query -

DB::table('ref')->select(['id','name',DB::raw('(case when (id > 17) then "yes" else "no" end) as present')])->get();

Comments

Submit
0 Comments